<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="questionConfigList" checkbox="true" pagination="true" fitColumns="false" title="问卷调查配置表" actionUrl="questionConfigController.do?datagrid" idField="id" fit="true" queryMode="group">
    <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="创建人名称"  field="createName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="创建人登录名称"  field="createBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="更新人名称"  field="updateName"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="更新人登录名称"  field="updateBy"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="更新日期"  field="updateDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="所属部门"  field="sysOrgCode"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="所属公司"  field="sysCompanyCode"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="流程状态"  field="bpmStatus" hidden="true"   queryMode="single" dictionary="bpm_status" width="120"></t:dgCol>
    <t:dgCol title="标题"  field="bpmTitle"    queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="问题"  field="bpmQuestion" hidden="true"   queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="备用1"  field="by1" hidden="true"   queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="备用2"  field="by2"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="备用3"  field="by3" hidden="true"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="300"></t:dgCol>
   <t:dgDelOpt title="删除" url="questionConfigController.do?doDel&id={id}" urlclass="ace_button"  urlfont="fa-trash-o"/>
   <t:dgFunOpt funname="LooksBpm(id)" title="预览" urlclass="ace_button"></t:dgFunOpt>
   <t:dgFunOpt funname="createBpm(id)" title="生成问卷" urlclass="ace_button"></t:dgFunOpt>
   <t:dgFunOpt funname="intoBpmDate" title="填写问卷" urlclass="ace_button"></t:dgFunOpt>
   <t:dgFunOpt funname="lookBpmDate(id)" title="报表统计" urlclass="ace_button"></t:dgFunOpt>
   <t:dgToolBar title="录入" icon="icon-add" url="questionConfigController.do?goAdd" funname="addno"></t:dgToolBar>
   <t:dgToolBar title="编辑" icon="icon-edit" url="questionConfigController.do?goUpdate" funname="update"></t:dgToolBar>
   <t:dgToolBar title="批量删除"  icon="icon-remove" url="questionConfigController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
   <t:dgToolBar title="查看" icon="icon-search" url="questionConfigController.do?goUpdate" funname="detail"></t:dgToolBar>
   <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
   <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
   <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
  </t:datagrid>
  </div>
 </div>
 <script src = "webpage/lv/questionConfigList.js"></script>		
 <script type="text/javascript">
 $(document).ready(function(){
 });
 
   function addno(){
	   openwindow("新增", "questionConfigController.do?goAdd","模板添加", "800px", "600px");
   }
 
//导入
function ImportXls() {
	openuploadwin('Excel导入', 'questionConfigController.do?upload', "questionConfigList");
}

//导出
function ExportXls() {
	JeecgExcelExport("questionConfigController.do?exportXls","questionConfigList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("questionConfigController.do?exportXlsByT","questionConfigList");
}

//表预览页面跳转
function LooksBpm(id){
	console.log(id);
	var date = $("#questionConfigList").datagrid();
	console.log(date);
	console.log("questionConfigController.do?looksPage&selectId="+id);
	createwindow("表预览", "questionConfigController.do?looksPage&selectId="+id,"800","600");
}

function createBpm(id){
	/* 更新或者生成问卷表 */
    $.ajax({
					url : "questionConfigController.do?createQuestionTable",
					type : 'post',
					data : {
						id : id
					},
					cache : false,
					success : function(data) {
						var d = $.parseJSON(data);
						if (d.success) {
							var msg = d.msg;
							tip(msg);
						}
					}
				});
	tip("正在开发");
}

function intoBpmDate(){
	/* 数据填写  提交数据页面  */
	tip("正在开发");
}

function lookBpmDate(){
	tip("正在开发");
	
}

 </script>